//
//  CRHeaderModel.m
//  NewAge
//
//  Created by dllo on 15/11/27.
//  Copyright © 2015年 ColorRevolution. All rights reserved.
//

#import "CRHeaderModel.h"

@implementation CRHeaderModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"url"]) {
        self.myurl = value;
    }
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.imgsrc forKey:@"imgsrc"];
    [aCoder encodeObject:self.myurl forKey:@"myurl"];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    //    self.name = [aDecoder decodeObjectForKey:@"name"];
    self = [super init];
    if (self) {
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.imgsrc = [aDecoder decodeObjectForKey:@"imgsrc"];
        self.myurl = [aDecoder decodeObjectForKey:@"myurl"];
    }
    return self;
}

@end
